package com.wms.system.domain.entity.sale;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wms.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("sale_project_contract")
public class SaleProjectContract {

    @TableId(type = IdType.AUTO)
    @TableField("id")
    @ApiModelProperty("id")
    private Long id;

    @TableField("create_user_name")
    @ApiModelProperty("创建人名称")
    private String createUserName;

    @TableField("create_time")
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("修改人名称")
    @TableField("update_user_name")
    private String updateUserName;

    @TableField("update_time")
    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @TableField("project_id")
    @ApiModelProperty(value = "项目ID")
    private Long projectId;

    @ApiModelProperty("项目编号")
    @TableField(exist = false)
    @Excel(name = "项目编号")
    private String projectCode; // 项目编号：P202510001

    @ApiModelProperty("项目名称")
    @TableField(exist = false)
    @Excel(name = "项目名称")
    private String projectName; // 项目名称

    @TableField("quotation_amount")
    @ApiModelProperty(value = "报价金额（含税 / 不含税）")
    @Excel(name = "报价金额")
    private BigDecimal quotationAmount;

    @TableField("contract_amount")
    @ApiModelProperty(value = "合同金额（实际签订金额）")
    @Excel(name = "合同金额")
    private BigDecimal contractAmount;

    @TableField("payment_progress")
    @ApiModelProperty(value = "收款进度（0 首款 / 1 中期款 / 2 尾款）")
    @Excel(name = "收款进度",readConverterExp = "0=首款,1=中期款,2=尾款")
    private Integer paymentProgress;

    @TableField("invoice_info")
    @ApiModelProperty(value = "发票信息（发票号、金额、开票日期）")
    @Excel(name = "发票信息")
    private String invoiceInfo;

    @TableField("customer_po_number")
    @ApiModelProperty(value = "客户PO号（客户下单编号）")
    @Excel(name = "客户PO号")
    private String customerPoNumber;

    @TableField("contract_number")
    @ApiModelProperty(value = "合同号（内部或客户合同编号）")
    @Excel(name = "合同号")
    private String contractNumber;


}
